﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _0712502_0712504_DesignPatternGame
{
    public class GameEntityFactory
    {
        public VisibleGameEntity[] _prototypes;
        protected int _nprototype;
        
        public virtual void InitPrototypes()
        {
        
        }

        public virtual VisibleGameEntity CreateObject(int idx)
        {
            if ((idx < 0) || (idx >= _nprototype))
            {
                return null;
            }

            return _prototypes[idx].Clone();         
        }
    }
}
